/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package game;

import framework.GObject;
import java.awt.Graphics2D;

/**
 *
 * @author Bryan Salazar
 */
public class MoleRat extends GObject{
   public int counter = 0;
   public int inc = 1;

   
   public MoleRat(int x, int y) {
      this.loadImage("images/molerat.png");
      this._x = x;
      this._y = y;
      
   }
   
//   public void render(Graphics2D g2) {
//      
//      g2.drawImage(this._img, this._x, this._y, _width, 30, null);
//      
//   }
   
   public void animate() {
      
      if(this.counter > 50) {
         this.inc =(int) -.05;
         this.counter = 0;
         this._y+=this.inc;
      } else {
         this.inc = (int).05;
         this._y+=this.inc;
      }
      
      this.counter++;
//      System.out.println(this.counter);
   }
}
